//
//  KKMessageItem.h
//  KKLiveDemo
//
//  Created by leo on 2017/7/29.
//  Copyright © 2017年 leo. All rights reserved.
//

//  消息-对象
#import "KKLiveBaseModel.h"

typedef NS_ENUM(NSUInteger, KKMessageType) {
    KKMessageType_UnKnown = 0,      /**<未知消息类型*/
    KKMessageType_Text = 1,         /**<文本*/
    KKMessageType_Image = 2,        /**<图片*/
    KKMessageType_Face = 3,         /**<表情*/
    KKMessageType_Sound = 4,        /**<语音*/
    KKMessageType_Multi = 5,        /**<富文本*/
    KKMessageType_Gif = 6,          /**<gif表情*/
    KKMessageType_Custom = 7,       /**<自定义消息*/
    KKMessageType_TimeTip = 8,      /**<时间提醒标签，不存在于IMSDK缓存的数据库中，业务动态生成*/
    KKMessageType_GroupTips = 9,    /**<群提醒*/
    KKMessageType_GroupSystem = 10, /**<群系统消息*/
    
    KKMessageType_RevokedTips = 11, /**<消息撤回*/
};

typedef NS_ENUM(NSUInteger, KKMessageStatus) {
    KKMessageStatus_Init = -1,
    KKMessageStatus_WillSending = 0,
    KKMessageStatus_Sending = 1,
    KKMessageStatus_SendSuccess = 2,
    KKMessageStatus_SendFail = 3,
};

@interface KKMessageItem : KKLiveBaseModel

@property (nonatomic, strong) id msg;
@property (nonatomic, assign) KKMessageType type;
@property (nonatomic, assign) KKMessageStatus status;


+ (instancetype)msgWithText:(NSString*)text;

+ (instancetype)msgWithImage:(UIImage *)image isOrignal:(BOOL)origal;

+ (instancetype)msgWithDate:(NSDate*)timetips;

+ (instancetype)msgWithRevoked:(NSString *)sender;

+ (instancetype)msgWithSound:(NSData *)data duration:(NSInteger)duration;


- (BOOL)isMineMsg;
- (BOOL)isC2CMsg;
- (BOOL)isGroupMsg;

@end
